package com.leyou.auth.mapper;

import com.leyou.common.mapper.BaseMapper;
import com.leyou.search.pojo.Category;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface CategoryMapper extends BaseMapper<Category,Long> {
    @Select("select tc.id,tc.name,tc.parent_id,tc.is_parent,tc.sort from tb_category_brand tcb left join tb_category tc on tcb.category_id = tc.id where tcb.brand_id = #{bid} ")
    List<Category> queryByBrandId(@Param("bid") Long bid);
}
